Skip to content

owner(ticdc): close the ddl sink to fix the resource leak#12678

Merged
ti-chi-bot[bot] merged 5 commits into
pingcap:release-7.5from
3AceShowHand:ddl-sink-leak-fix-7.5
Jul 3, 2026
Merged

owner(ticdc): close the ddl sink to fix the resource leak#12678
ti-chi-bot[bot] merged 5 commits into
pingcap:release-7.5from
3AceShowHand:ddl-sink-leak-fix-7.5

Conversation

@3AceShowHand

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: ref #12666

What is changed and how it works?

  • close the ddl sink
  • remove verbose and low informative logs

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

close the kafka ddl sink to fix the resource leak

@ti-chi-bot ti-chi-bot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes a noisy log statement in shared_client.go and updates ddl_sink.go to properly close the DDL sink before setting it to nil during retries. However, a potential data race and nil-pointer panic was identified in ddl_sink.go because s.sink is accessed and modified concurrently without synchronization; introducing a mutex is recommended to protect these operations.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread cdc/owner/ddl_sink.go Outdated
@ti-chi-bot ti-chi-bot Bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 5, 2026
@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 1, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kennytm, lidezhu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot

ti-chi-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

[LGTM Timeline notifier]

Timeline:

  • 2026-06-05 05:53:14.821695937 +0000 UTC m=+507295.892013317: ☑️ agreed by kennytm.
  • 2026-07-01 04:04:34.502870343 +0000 UTC m=+185016.203249755: ☑️ agreed by lidezhu.

@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 2, 2026
@3AceShowHand

Copy link
Copy Markdown
Contributor Author

/test all

@3AceShowHand

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@3AceShowHand

Copy link
Copy Markdown
Contributor Author

/retest

@kennytm

kennytm commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

https://do.pingcap.net/jenkins/job/pingcap/job/tiflow/job/release-7.5/job/ghpr_verify/992/console

java.lang.NoSuchMethodError: No such DSL method 'lock' found among steps [...] or symbols [...] or globals [...]
	at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:223)
	...

🤔

@kennytm

kennytm commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

/test pull-verify

@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/retest

@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/test all

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-7.5@ba1539b). Learn more about missing BASE report.

Additional details and impacted files
Components Coverage Δ
cdc 61.7767% <0.0000%> (?)
dm 51.3101% <0.0000%> (?)
engine 63.4211% <0.0000%> (?)
Flag Coverage Δ
unit 57.4739% <89.2857%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@               Coverage Diff                @@
##             release-7.5     #12678   +/-   ##
================================================
  Coverage               ?   57.4739%           
================================================
  Files                  ?        860           
  Lines                  ?     128432           
  Branches               ?          0           
================================================
  Hits                   ?      73815           
  Misses                 ?      49204           
  Partials               ?       5413           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/test pull-cdc-integration-kafka-test

1 similar comment
@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/test pull-cdc-integration-kafka-test

@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/retest

@3AceShowHand

Copy link
Copy Markdown
Contributor Author

/test pull-cdc-integration-pulsar-test

@3AceShowHand

Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@wuhuizuo

wuhuizuo commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

/retest

@ti-chi-bot ti-chi-bot Bot merged commit 868b51b into pingcap:release-7.5 Jul 3, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved cherry-pick-approved Cherry pick PR approved by release team. lgtm release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants